<?php

use App\Kuafu\User\Controller\Outside\FsUserController;
use App\Library\FeiShu\SendFs;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Kuafu\Invoice\Controller\Ext\InvoiceController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
// 对外展示的路由-非回调路由

//电子发票
Route::prefix('ping')->group(function () {
    Route::get('/', function () {
        return 'pong';
    });
});

//电子发票 invoice
Route::prefix('i')->group(function () {
    Route::get('/{orderId}', [InvoiceController::class, 'jumpUrl'])->where('orderId', '(.*)');
});

// 阿里云宜搭
Route::prefix('aliwork')->group(function () {
    Route::any('/cameraImport', [\App\Kuafu\Shop\Controller\Outside\CameraController::class, 'aliWorkImport']);
});

// 飞书回调
Route::prefix('fs')->group(function () {
    Route::post('/notify', [FsUserController::class, 'notify']);
});

// 对外公众号模块
Route::prefix('wechat')->group(function () {
    Route::prefix('official')->group(function () {
        Route::get('/getWxConfig', [\App\Kuafu\Wechat\Controller\Outside\OfficialController::class, 'getWxConfig']);
    });

});